<template>
	<view>
		<u-sticky bgColor="#fff">
			<u-tabs lineColor="#FFB800" :scrollable="false" lineWidth="15" :activeStyle="{
			             color: '#000000',
			             fontWeight: 'bold',
			             transform: 'scale(1.05)'
			         }" :inactiveStyle="{
			             color: '#666666',
			             transform: 'scale(1)'
			         }" :list="list1" @change="tabChage"></u-tabs>
		</u-sticky>
		<view class="mainpadding2">
			<view class="mainpadding_top ffffff radius">
				<view class="pdl flexbetween">
					<view class="main_size hei_text bold">訂單號：121213123123312</view>
					<view class="huang_text main_size bold">待處理</view>
					<!-- <view class="lv_text main_size bold">已处理</view>
					<view class="hong_text main_size bold">已拒绝</view> -->
				</view>
				<view class="margin_top2" :class="1+1==2?'pdl':''">
					<view class="flexleft">
						<image src="../../static/image/system/hujiaofw.png" mode="" class="leftmoveimg margin_right">
						</image>
						<view class="rightmove">
							<view class="titletext bold hei_text yihang">孤注一擲</view>
							<view class="xiaohui">上架時間：2023-23-32</view>
							<view class="flexbetween">
								<view class="xiaohui">數量：1張</view>
								<view class="main_size huang_text bold">
									<text class="xiaohui">總價</text>$238.00
								</view>
							</view>
						</view>
					</view>
					<view class="bghui  radius mainpadding_top">
						<view class="flexbetween">
							<view class="flexleft">
								<view class="xiaohui">扣除手續費:</view>
								<view class="xiaohuang">$232843</view>
							</view>
							<view class="flexleft">
								<view class="xiaohui">退款點數:</view>
								<view class="xiaohuang">$232843</view>
							</view>
						</view>
						<view class="xiaohui margin_top2">拒絕原因拒絕原因拒絕原因拒絕原因拒絕原因拒絕原因拒絕原因拒絕原因拒絕原因</view>
					</view>
				</view>
				<view class="flexright margin_top2">
					<view class="listbtnhui" @click="jujue">拒絕</view>
					<view class="listbtnhuang margin_left" @click="sure">同意</view>
				</view>
			</view>
		</view>
		<u-modal :show="show" title="拒絕" showCancelButton confirmColor="#ff8505" @confirm="jujueconfirm" confirmText="確認" cancelText="取消"
			@cancel="show=false">
			<view class="slot-content mainpadding">
				<textarea class="bghui mainpadding" style="height: 250rpx;" placeholder="請輸入拒絕原因"></textarea>
			</view>
		</u-modal>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				list1: [{
						name: "待處理",
						id: 1
					},
					{
						name: "已處理",
						id: 2
					}
				],
				tabsId: 1,
				show: false,
			}
		},
		methods: {
			sure() {
				httpRequest.modal('提示', '確定同意退票嗎？', true, (res) => {
					if (res) {
						// httpRequest.request('/api/index.php/v1/order/cancel', 'POST', {
						// 	id: id,
						// }).then(res => {
						// 	httpRequest.toast(res.msg)
						// 	this.init()
						// })
					}
				})
			},
			// 拒绝
			jujue() {
				this.show = true
			},
			jujueconfirm() {
				this.show = false
			},
			tabChage(e) {
				this.tabsId = e.id
			},
			jumpurl(url) {
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style>

</style>